package com.lzlclass.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.UUID;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Component
//@Import({User.class})
//@ConfigurationProperties(
//        prefix = "student"
//)
public class Student {

   @TableId(value = "sid",type = IdType.UUID)
    private String sid;
    private String sname;
    private String saddress;
    private int sage;
    private int cid;

    @TableField(exist = false)
    private Classinfo classinfo;

    public Student(String sname, String saddress, int sage) {

        this.sname = sname;
        this.saddress = saddress;
        this.sage = sage;
    }

    public Student(String sid, String sname, String saddress, int sage) {
        this.sid = sid;
        this.sname = sname;
        this.saddress = saddress;
        this.sage = sage;
    }

    @TableField(fill = FieldFill.INSERT)
    private Date createtime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatetime;


    @Version
    private int version;

    //    private int id;
//
//    private String name;
//
//    private List<String> list;
//
//    private User user;
//
//    private List<User> listusers;
//
//    private Map<String,String> map;







}
